package cn.bb.bbstudy.service.impl;

import cn.bb.bbstudy.dao.SayDAO;
import cn.bb.bbstudy.pojo.Say;
import cn.bb.bbstudy.service.SayService;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import javax.annotation.Resource;
import java.util.List;

@Service
@Transactional
public class SayServiceImpl implements SayService{

    @Resource
    private SayDAO sayDAO;

    @Override
    public int deleteByPrimaryKey(String id) {
        return sayDAO.deleteByPrimaryKey(id);
    }

    @Override
    public int insert(Say record) {
        return sayDAO.insert(record);
    }

    @Override
    public int insertSelective(Say record) {
        return sayDAO.insertSelective(record);
    }

    @Override
    public Say selectByPrimaryKey(String id) {
        return sayDAO.selectByPrimaryKey(id);
    }

    @Override
    public int updateByPrimaryKeySelective(Say record) {
        return sayDAO.updateByPrimaryKeySelective(record);
    }

    @Override
    public int updateByPrimaryKey(Say record) {
        return sayDAO.updateByPrimaryKey(record);
    }

    @Override
    public List<Say> selectAllDesc(Integer size){
        return sayDAO.selectAllDesc(size);
    }

}
